<template>
  <div>
    <van-search v-model="searchform.strAppname" placeholder="请输入名称"/>
    <p v-if="listData.length===0" class="yyp">暂无数据~</p>
    <van-swipe-cell v-else v-for="item in listData" :key="item.id">
      <div class="yycard">
        <div class="yycard_p">
          <p>机构名称：{{item.strOrgname}}</p>
          <p>级别：{{item.orgLevelname}}</p>
          <p>设备数：{{item.num}}</p>
        </div>
      </div>
    </van-swipe-cell>
  </div>
</template>

<script>
  import {ShowDetail} from '@/api/application'
  export default {
    name: 'ApplicationData',
    data() {
      return {
        listData: [],
        loading: false,
        searchform: {
          strAppname: '',
          iApptype: ''
        }
      }
    },
    created() {
      this.iAppnum = this.$route.query.rowAll
      this.fetchData()
    },
    methods: {
      //获取详情中应用数据
      fetchData() {
        ShowDetail({iAppnum:this.iAppnum}).then(res => {
          this.listData = res.ordInfoList
        })
      }
    }
  }
</script>

<style lang="scss" scoped>
  .yyp{
    text-align: center;
    font-size: 14px;
    color: #8c8a8a;
    line-height: 2;
  }
  .yycard{
    display: flex;
    border-bottom: 1px solid whitesmoke;
    padding: 5px 0;
    margin-left: 20px;
  }
  .yyimg{
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background-color: #F5F7FA;
  }
  .yycard_p{
    font-size: 14px;
    line-height: 20px;
    vertical-align: middle;
    padding-left: 10px;
    color: #6b6b6b;
  }
  .yycard_title{
    font-size: 14px;
    color: #000;
  }
  .van-button--primary {
    background-color: #0c1b35;
    border-color: #0c1b35;
    border-radius: 4px;
    width: 90%;
    margin: 20px;
  }

  .van-button--danger{
    height: 100%;
  }

  .delete-button2{
    background-color: #6b6b6b;
    border:1px solid #6b6b6b;
  }
  /deep/ .van-search__content {
    border-radius: 20px;
    background-color: #e7e9ec;
  }


</style>
